Optimal. Leaf size=141 \[ \frac{2 \tan ^{-1}\left (\frac{\sqrt{a} \sqrt{c} \tan (e+f x)}{\sqrt{a \sec (e+f x)+a} \sqrt{c+d \sec (e+f x)}}\right )}{\sqrt{a} \sqrt{c} f}-\frac{\sqrt{2} \tan ^{-1}\left (\frac{\sqrt{a} \sqrt{c-d} \tan (e+f x)}{\sqrt{2} \sqrt{a \sec (e+f x)+a} \sqrt{c+d \sec (e+f x)}}\right )}{\sqrt{a} f \sqrt{c-d}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.338635, antiderivative size = 141, normalized size of antiderivative = 1., number of steps used = 5, number of rules used = 4, integrand size = 29, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.138, Rules used = {3938, 3934, 203, 3983} \[ \frac{2 \tan ^{-1}\left (\frac{\sqrt{a} \sqrt{c} \tan (e+f x)}{\sqrt{a \sec (e+f x)+a} \sqrt{c+d \sec (e+f x)}}\right )}{\sqrt{a} \sqrt{c} f}-\frac{\sqrt{2} \tan ^{-1}\left (\frac{\sqrt{a} \sqrt{c-d} \tan (e+f x)}{\sqrt{2} \sqrt{a \sec (e+f x)+a} \sqrt{c+d \sec (e+f x)}}\right )}{\sqrt{a} f \sqrt{c-d}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3938
Rule 3934
Rule 203
Rule 3983
Rubi steps
\begin{align*} \int \frac{1}{\sqrt{a+a \sec (e+f x)} \sqrt{c+d \sec (e+f x)}} \, dx &=\frac{\int \frac{\sqrt{a+a \sec (e+f x)}}{\sqrt{c+d \sec (e+f x)}} \, dx}{a}-\int \frac{\sec (e+f x)}{\sqrt{a+a \sec (e+f x)} \sqrt{c+d \sec (e+f x)}} \, dx\\ &=-\frac{2 \operatorname{Subst}\left (\int \frac{1}{1+a c x^2} \, dx,x,-\frac{\tan (e+f x)}{\sqrt{a+a \sec (e+f x)} \sqrt{c+d \sec (e+f x)}}\right )}{f}+\frac{2 \operatorname{Subst}\left (\int \frac{1}{2+(a c-a d) x^2} \, dx,x,-\frac{\tan (e+f x)}{\sqrt{a+a \sec (e+f x)} \sqrt{c+d \sec (e+f x)}}\right )}{f}\\ &=\frac{2 \tan ^{-1}\left (\frac{\sqrt{a} \sqrt{c} \tan (e+f x)}{\sqrt{a+a \sec (e+f x)} \sqrt{c+d \sec (e+f x)}}\right )}{\sqrt{a} \sqrt{c} f}-\frac{\sqrt{2} \tan ^{-1}\left (\frac{\sqrt{a} \sqrt{c-d} \tan (e+f x)}{\sqrt{2} \sqrt{a+a \sec (e+f x)} \sqrt{c+d \sec (e+f x)}}\right )}{\sqrt{a} \sqrt{c-d} f}\\ \end{align*}
Mathematica [A] time = 0.342739, size = 171, normalized size = 1.21 \[ \frac{2 \cos \left (\frac{1}{2} (e+f x)\right ) \sec (e+f x) \sqrt{c \cos (e+f x)+d} \left (\sqrt{2} \sqrt{c-d} \tan ^{-1}\left (\frac{\sqrt{2} \sqrt{c} \sin \left (\frac{1}{2} (e+f x)\right )}{\sqrt{c \cos (e+f x)+d}}\right )-\sqrt{c} \tan ^{-1}\left (\frac{\sqrt{c-d} \sin \left (\frac{1}{2} (e+f x)\right )}{\sqrt{c \cos (e+f x)+d}}\right )\right )}{\sqrt{c} f \sqrt{c-d} \sqrt{a (\sec (e+f x)+1)} \sqrt{c+d \sec (e+f x)}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.332, size = 424, normalized size = 3. \begin{align*} -2\,{\frac{\cos \left ( fx+e \right ) \left ( -1+\cos \left ( fx+e \right ) \right ) }{af\sqrt{c-d} \left ({c}^{2}-2\,cd+{d}^{2} \right ) c \left ( \sin \left ( fx+e \right ) \right ) ^{2}}\sqrt{{\frac{a \left ( 1+\cos \left ( fx+e \right ) \right ) }{\cos \left ( fx+e \right ) }}}\sqrt{{\frac{d+c\cos \left ( fx+e \right ) }{\cos \left ( fx+e \right ) }}} \left ( \sqrt{2}\sqrt{- \left ( c-d \right ) ^{4}c}\arctan \left ({\frac{c \left ( c-d \right ) ^{2}\sqrt{2} \left ( -1+\cos \left ( fx+e \right ) \right ) }{\sqrt{- \left ( c-d \right ) ^{4}c}\sin \left ( fx+e \right ) }{\frac{1}{\sqrt{-2\,{\frac{d+c\cos \left ( fx+e \right ) }{1+\cos \left ( fx+e \right ) }}}}}} \right ) \sqrt{c-d}+\ln \left ( -{\frac{1}{\sin \left ( fx+e \right ) } \left ( \sqrt{c-d}\cos \left ( fx+e \right ) -\sqrt{-2\,{\frac{d+c\cos \left ( fx+e \right ) }{1+\cos \left ( fx+e \right ) }}}\sin \left ( fx+e \right ) -\sqrt{c-d} \right ) } \right ){c}^{3}-2\,\ln \left ( -{\frac{1}{\sin \left ( fx+e \right ) } \left ( \sqrt{c-d}\cos \left ( fx+e \right ) -\sqrt{-2\,{\frac{d+c\cos \left ( fx+e \right ) }{1+\cos \left ( fx+e \right ) }}}\sin \left ( fx+e \right ) -\sqrt{c-d} \right ) } \right ){c}^{2}d+\ln \left ( -{\frac{1}{\sin \left ( fx+e \right ) } \left ( \sqrt{c-d}\cos \left ( fx+e \right ) -\sqrt{-2\,{\frac{d+c\cos \left ( fx+e \right ) }{1+\cos \left ( fx+e \right ) }}}\sin \left ( fx+e \right ) -\sqrt{c-d} \right ) } \right ) c{d}^{2} \right ){\frac{1}{\sqrt{-2\,{\frac{d+c\cos \left ( fx+e \right ) }{1+\cos \left ( fx+e \right ) }}}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{1}{\sqrt{a \sec \left (f x + e\right ) + a} \sqrt{d \sec \left (f x + e\right ) + c}}\,{d x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 3.86766, size = 2290, normalized size = 16.24 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{1}{\sqrt{a \left (\sec{\left (e + f x \right )} + 1\right )} \sqrt{c + d \sec{\left (e + f x \right )}}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]